import request from '@/utils/request'

// 查询为你推荐配置列表
export function listRecommended(query) {
  return request({
    url: '/system/recommended/list',
    method: 'get',
    params: query
  })
}

// 查询为你推荐配置详细
export function getRecommended(recommendedId) {
  return request({
    url: '/system/recommended/' + recommendedId,
    method: 'get'
  })
}

// 新增为你推荐配置
export function addRecommended(data) {
  return request({
    url: '/system/recommended',
    method: 'post',
    data: data
  })
}

// 修改为你推荐配置
export function updateRecommended(data) {
  return request({
    url: '/system/recommended',
    method: 'put',
    data: data
  })
}

// 删除为你推荐配置
export function delRecommended(recommendedId) {
  return request({
    url: '/system/recommended/' + recommendedId,
    method: 'delete'
  })
}

export function listProducts() {
  return request({
    url: '/system/recommended/products',
    method: 'get'
  })
}
